package org.example.maven.utils.excel;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExcelImportResult<T> {
    private int totalRows;     // 总处理行数
    private int successCount; // 成功数量
    private List<T> successData = new ArrayList<>();
    private List<RowError> errors = new ArrayList<>();

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class RowError {
        private int rowNum;    // Excel中的行号（从1开始）
        private String message;
    }
}
